const http = require('http');
//调用createServer(request,response)方法
http.createServer((req,res) => {
    console.log(req.url);
    console.log(req.method);
    res.write('I am server');
    res.end();
}).listen(3000,() => {
    console.log('成功！');
})